<?php

namespace App\Http\Controllers\Api\czy;

use App\Common\Curl;
use App\Models\lak\Residential;
use App\Utils\Adapter\Map;
use App\Utils\Logic\gao\AgentLogic;
use App\Utils\Thirdparty\Map\Amap;
use Illuminate\Http\Request;

class MapController
{
    /**
     * 引入高德组件画圈找房
     * @param Request $request
     * @return array|string
     */

    public function index(Request $request)
    {
        try {
            $params = $request->validate([
                'lat' => 'required',
                'lng' => 'required',
                'radius'=>'required',
                'type'=>'required',
            ]);
            $datas = \App\Utils\Logic\czy\Map::opiFang($params);
            return $datas;
        }catch (\Exception $e){
            return $e->getMessage();
        }
    }

}
